import { useHistory } from 'umi'
import { Button, NavBar } from 'antd-mobile'
import styles from './index.module.less'

export default () => {
    const history = useHistory()

    const onClickToDetail = () => {
        history.push('/demo/detail')
    }

    return (
        <div className={styles.page}>
            <NavBar backArrow={false}>demo页</NavBar>
            <div className={styles.title}>上午好，孙羽</div>
            <Button color="primary" onClick={onClickToDetail}>
                to detail
            </Button>
        </div>
    )
}
